<template>
  <div>
    <div class="main">
      <eagle-input
        class="input_text"
        readonly
        label="任命书类别"
        v-model="form.AppointmentTypeName"
        name="AppointmentTypeName"
        is-link
        required
      >
      </eagle-input>

      <eagle-input
        label="文件名称"
        v-model="form.Name"
        name="Name"
        readonly
      >
      </eagle-input>
      <eagle-file-view
        :attachs="form.Attachs"
        :labelName="'签名文件'"
      />
    </div>
  </div>
</template>
<script>
export default {
  components: {},
  data() {
    return {
      id: this.$route.query.id,
      form: {},
    };
  },
  created() {
    if (this.$route.query.id != null) {
      (this.id = this.$route.query.id), this.getDetail();
    }
  },
  methods: {
    getDetail() {
      let params = { id: this.id };
      this.$axios
        .get("/SiteAppointment/GetDetail", { params: params })
        .then((res) => {
          for (var i = 0; i < res.data.AppointmentTypeList.length; i++) {
            let item = res.data.AppointmentTypeList[i];
            if (item.ID == res.data.AppointmentType) {
              res.data.AppointmentTypeName = item.Name;
              break;
            }
          }
          this.form = res.data;
        });
    },
  },
};
</script>

<style lang="less" >
.wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.block {
  width: 120px;
  height: 120px;
  background-color: #fff;
}
</style>
<style lang="less" scoped>
.space-between {
  justify-content: space-between;
}
</style>
